package com.example.homework1.entity;



public class Student{


    private int number;
    private String name;
    private  Address address;


    public  Student(int number,String name){
        this.number=number;
        this.name=name;
    }
    public Student(int number,String name, Address address){
        this.number=number;
        this.name=name;
        this.address=address;
    }

    public Student() {

    }

    public int getNumber() {
        return number;
    }
    public void setNumber(int number) {
        this.number = number;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public Address getAddress() {
        return address;
    }
    public void setAddress(Address address) {
        this.address = address;
    }

    public void display(){
        System.out.println("学号："+number);
        System.out.println("姓名："+name);
        System.out.println("地址："+address.getCountry()+","+address.getProvince()+","+address.getCity());
    }

}
